import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;

public class GETRESOURCE {
    public static  void GetResource()throws Exception {
        InputStream is=new  FileInputStream("D:\\临时文件夹1\\java-study\\untitled1\\src\\resouce\\resouce.txt");
        InputStreamReader isr=new InputStreamReader(is);
        BufferedReader br=new BufferedReader(isr);
        String line=br.readLine();
        try {
            if(line==null){
                System.out.println("文件为空");
            }
            else {
                String[] temp1=line.split("\\p{Punct}{7}[)]$");
                for (int i = 0; i <= temp1.length-1; i++) {
                    String[] temp2=temp1[i].split("[\\p{Punct}]+");
                    Main.staffList.add(new Staff(
                            temp2[0],
                            temp2[1],
                            temp2[2],
                            temp2[3],
                            temp2[4],
                            temp2[5],
                            temp2[6],
                            temp2[7]));
                }
            }
        }finally {
            is.close();
            isr.close();
            br.close();
        }
    }
}
